package com.woniu.Service.impl;

import com.woniu.Service.AccountService;
import com.woniu.domain.Account;
import com.woniu.mapper.AccountMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @author Rain
 * @Description :
 * @date 2022/08/19 19:34
 */
@Service
public class AccountServiceImpl implements AccountService {

    AccountMapper am;

    @Autowired
    public void setAm(AccountMapper am) {
        this.am = am;
    }

    //    @Transactional
    @Override
    public List<Account> findAll() {
        return am.findAll();
    }

    @Override
    public void addAccount(Account account) {
        am.addAccount(account);
    }

    @Override
    public void removeAccountById(int id) {
        am.removeAccountById(id);
    }

    @Override
    public void updateAccount(Account account) {
        am.updateAccount(account);
    }

    @Override
    public List<Account> findByName(String username) {
        return am.findByName(username);
    }

    @Override
    public List<Account> findByIDs(Integer[] ids) {
        return am.findByIDs(ids);
    }

    @Override
    public void addOneForMap(Map<String, Object> userinfo) {
        am.addOneForMap(userinfo);
    }
}
